package com.xaicode.template.activemq;

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;

import javax.jms.Queue;

/**
 * @author Locker
 * @date 2021/8/3 0003 16:57
 */
@EnableJms
@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    // 定义存放消息
    @Bean
    public Queue queue() {
        return new ActiveMQQueue("ActiveMQQueue");
    }

}
